import Api from './request'



// 登录接口
export const postLoginApi = (data) => Api.post('/api/login', data)

// 注册接口
export const postRegisterApi = (data) => Api.post("/api/register", data)

// 重置密码接口
export const postResetPasswordApi = (data) => Api.post("/api/resetPassword", data)

// 获取验证码
export const getRegisterCodeApi = (data) => Api.get("/api/register/code", data)

// 获取个人信息
export const getInfoApi = () => Api.get("/api/user")

// 通过id获取个人信息
export const getInfoByIdApi = (data) => Api.get(`/api/user/${data.id}`)

// 更新个人信息
export const putInfoApi = (data) => Api.put("/api/user", data)

// 是否关注用户
export const getIsFollowingApi = (data) => Api.get(`/api/user/isFollowing/${data.id}`)

// 关注用户
export const postFollowApi = (data) => Api.post(`/api/user/follow/${data.id}`)

// 取消关注用户
export const postUnFollowApi = (data) => Api.post(`/api/user/unfollow/${data.id}`)

// 是否好友
export const getIsFriendApi = (data) => Api.get(`/api/user/isFriend/${data.id}`)

// 获取好友列表
export const getFriendAllApi = (data) => Api.get('/api/user/friend/all')

// 获取关注列表
export const getFollowingAllApi = (data) => Api.get('/api/user/following/all')

// 获取粉丝列表
export const getFansAllApi = (data) => Api.get('/api/user/fans/all')

// 获取交友列表
export const getMakingFrienfApi = (data) => Api.get('/api/user/making/friend')

// 活跃排行榜
export const getActiveRankingApi = (data) => Api.get('/api/user/active/ranking')

// 钱包充值
export const postWalletRechargeApi = (data) => Api.post('/api/user/wallet/recharge', data)

// 查询余额记录
export const getWalletLogApi = (data) => Api.get('/api/user/wallet/log')